package com.lizhi.menu.service.impl;

import com.lizhi.menu.domain.MenuComment;
import com.lizhi.menu.mapper.MenuCommentMapper;
import com.lizhi.menu.service.IMenuCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 食谱评论Service业务层处理
 *
 * @author lizhi
 * @date 2023-05-18
 */
@Service
public class MenuCommentServiceImpl implements IMenuCommentService {
    @Autowired
    private MenuCommentMapper menuCommentMapper;

    /**
     * 查询食谱评论
     *
     * @param id 食谱评论主键
     * @return 食谱评论
     */
    @Override
    public MenuComment selectMenuCommentById(Long id) {
        return menuCommentMapper.selectById(id);
    }

    /**
     * 查询食谱评论列表
     *
     * @param menuComment 食谱评论
     * @return 食谱评论
     */
    @Override
    public List<MenuComment> selectMenuCommentList(MenuComment menuComment) {
        return menuCommentMapper.selectMenuCommentList(menuComment);
    }

    /**
     * 新增食谱评论
     *
     * @param menuComment 食谱评论
     * @return 结果
     */
    @Override
    public int insertMenuComment(MenuComment menuComment) {
        return menuCommentMapper.insertMenuComment(menuComment);
    }

    /**
     * 修改食谱评论
     *
     * @param menuComment 食谱评论
     * @return 结果
     */
    @Override
    public int updateMenuComment(MenuComment menuComment) {
        return menuCommentMapper.updateMenuComment(menuComment);
    }

    /**
     * 批量删除食谱评论
     *
     * @param ids 需要删除的食谱评论主键
     * @return 结果
     */
    @Override
    public int deleteMenuCommentByIds(Long[] ids) {
        return menuCommentMapper.deleteMenuCommentByIds(ids);
    }

    /**
     * 删除食谱评论信息
     *
     * @param id 食谱评论主键
     * @return 结果
     */
    @Override
    public int deleteMenuCommentById(Long id) {
        return menuCommentMapper.deleteMenuCommentById(id);
    }
}
